In recent years, as a compression-encoding format for a digital video signal, an encoding format named MPEG (Moving Picture Experts Group) has been widely used. The MPEG2 is a standard for a compression of moving pictures using DCT (Discrete Cosine Transform) and prediction encoding. Currently, since MPEG2 features higher expansibility and higher picture quality than the MPEG, the former has been more used than the latter. Next, the MEPG2 will be mainly described in comparison with the MPEG.
According to the MPEG, picture data for one frame is divided into macro blocks each having a predetermined size. Each macro block is predictively encoded using a moving vector. Each DCT block into which each macro block is further divided is encoded using DCT and thus encoded with variable length code. In each DCT block, DCT coefficients are arranged from a DC component to higher order AC components. For digital video data in a chroma format 4:2:2, each macro block is composed of a total of eight DCT blocks that are four DCT blocks as luminance components Y, two DCT blocks as color difference components Cr, and two DCT blocks as color difference components Cb. In each macro block, for example, four DCT blocks as luminance components Y, two DCT blocks as color difference components Cr, and two DCT blocks as color difference components Cb are arranged in succession.
In contrast, data of the MPEG2 is composed of a data stream having a hierarchical structure of a sequence layer as the highest layer, a GOP (Group Of Picture) layer, a picture layer, a slice layer, a macro block (MB) layer as the lowest layer. Each layer includes at least one lower hierarchical structure. Each layer has a header portion. In addition, each layer except for the macro block layer has a start code preceded by the header portion. The slice layer is the minimum unit necessary for decoding variable length code.
A picture corresponds to one screen. Three types of pictures that are an I picture, a P picture, and a B picture have been defined. The I picture is a picture that is intra-frame encoded. The P picture and the B picture are pictures that are predictively encoded.
The header of each layer describes various parameters necessary for encoding an MPEG stream. The parameters are for example profile, level, bit rate, and chroma format of the stream. Corresponding to parameters described in each header, an MPEG decoder can correctly decode the input MPEG stream.
A recording and reproducing apparatus that directly records the above-described MPEG stream to a record medium such as a magnetic tape and reproduces a recorded MPEG stream therefrom has been proposed. In such a recording and reproducing apparatus, one macro block is contained in a sync block that is the minimum data unit that is recorded. A predetermined number of sync blocks are placed on one track. With a predetermined number of tracks, data of one picture (one frame) is recorded. Tracks are formed as helical tracks of which a rotating head helically traces a magnetic tape.
As described above, an MPEG stream is compression-encoded using variable length code. On the other hand, fixed-length blocks referred to as sync blocks are recorded on a magnetic tape. In other words, it is necessary to place an MPEG stream composed of variable length code in packets each having a fixed length. In the MPEG stream, although each block (macro block) is variable length code, the bit rate of one picture (one frame) is constant. When the MPEG stream is recorded, each macro block that is variable length code is placed in the data storage area (referred to as payload) of each sync block. The portion that cannot be placed in a packet whose variable length code is less than the length of the payload. In such a manner, variable length code is converted into fixed length code. This process is referred to as packing. When data is reproduced, the reverse process of the recording operation is performed. In other words, macro blocks are restored to the original MPEG stream.
Now, a high speed reproducing operation of which pictures are reproduced from a magnetic tape that is driven at a higher speed than the recording operation will be described. In the high speed reproducing operation, a rotating head diagonally traces a plurality of helical tracks. Thus, the rotating head cannot completely trace one whole track. Consequently, when the above-described packing process is performed, if variable length code of a macro block exceeds the fixed length, the portion that exceeds the fixed length is placed in another packet. Thus, the portion cannot be restored as an original variable length code. As was described above, in the MPEG, since DCT blocks as luminance components and color difference components are arranged, when macro blocks are depacked, if data thereof is lost, for example color difference components are partly lost. Thus, a picture may be displayed in abnormal color or monochrome.
When an MPEG stream contains an error that cannot be corrected with error correction code (that will be described later), variable length code preceded by the error position in the slice cannot be decoded. Thus, as with the above-described high speed reproducing operation, the color difference components of the reproduced picture are partly lost. As a result, a picture is displayed in abnormal color or monochrome.
To solve such a problem, a method of which DC components and AC components are arranged over all DCT blocks of a macro block has been proposed. In this method, even if data packed in another packet is lost, it is high order AC component data of a DCT coefficient of each DCT block. Thus, although a high frequency component of the picture is lost, the picture quality Is not largely deteriorated.
In such a manner, macro blocks are converted and placed in packets each having a fixed length. To prevent a burst error from concentrating at a part of the picture, fixed-length packets are shuffled. The resultant data is encoded with error correction code using Reed-Solomon code and product code. A synchronous signal and additional information such as a predetermined ID are added to the data that has been shuffled and encoded with error correction code. The resultant data is a sync block that is the minimum unit of data that is recorded on a magnetic tape.
When an MPEG stream is reproduced, the error correction code is decoded corresponding to the ID that has been added when the stream is recorded. The shuffled sync blocks are restored to the sync blocks in the original order (this operation is referred to as deshuffling operation). The deshuffled data is depacked so as to restore the DCT coefficients. As a result, the MPEG stream is reproduced.
However, MPEG streams in various formats may be supplied to such a VTR. For example, as an example of a format, a chroma format is known. The chroma format represents the ratio of the sampling frequencies of a luminance signal and two color difference signals. For example, there are chroma formats 4:4:4, 4:2:2, and 4:2:0.
Broadcasting stations mainly use digital video signals in the chroma format 4:2:2. The broadcasting stations may use digital video signals in the chroma format 4:2:0. Next, it is assumed that a VTR has been designed so as to optimize a digital video signal in the chroma format 4:2:2 and that a digital video signal in the chroma format 4:2:0.
In this case, since the apparatus has been designed so as to optimize a digital video signal in the chroma format 4:2:2, a signal in the chroma format 4:2;0 should be temporarily decoded to an original video signal and then reencoded to a signal in the chroma format 4:2:2. As a result, the picture quality is inevitably deteriorated.
In addition, as was described above, when an MPEG stream is recorded, DCT coefficients are rearranged. Thus, with the apparatus optimized with a signal in the chroma format 4:2:2, if DCT coefficients in the chroma format 4:2:2 are rearranged, when the MPEG stream is reproduced, the rearranged DCT coefficients cannot be restored to correctly arranged DCT coefficients.
If arranged DCT coefficients are restored to correctly arranged DCT coefficients, each portion of the structure should be designed in consideration of the chroma formats. Thus, the structure becomes complicated and the designing steps are increased.
In addition, since the data length of the chroma format 4:2:2 is different from the data length of the chroma format 4:2:0, the difference may adversely affect the shuffling process and the error correction code encoding process that should be performed with fixed length data. When the shuffling process and the error correction code encoding process are adversely affected, it may be necessary to change the format of the VTR.